package fr.uvsq.isty.bdh.hchess.ranking;

import java.io.Serializable;

/**
 *
 * @author Clement Bellot <clementbellot@gmail.com>
 */
public class Player implements Serializable {
    private int rating;
    private String name;
    public Player(String name){
        assert name != null;
        this.name = name;
        this.rating = RatingCalculator.getDefaultRating();
    }
    public Player(String name, int rating){
        assert name != null;
        this.name = name;
        this.rating = rating;
    }
    
    public int getRating(){
        return rating;
    }
    
    public void setRating(int rating){
        this.rating = rating;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
    
}
